package com.lggry.staticmethod;

public class Student {
    private String name;
    //静态方法 static修饰 属于类持有
    public static void printInfo(){
        System.out.println("Info");
    }

    //实例方法
    public void printName(String name){
        this.name = name;
        System.out.println(this.name);
    }

    public void printNameLength(){
        System.out.println(this.name.length());
    }
}
